//
//  QRCodesManager.h
//  QRCodeManager
//
//  Created by Cosmin Stirbu on 4/16/13.
//  Copyright (c) 2013 Cosmin Stirbu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "QRCode.h"

// QrCodeTypes
typedef enum QRCodeTypes{
	// Constant indicating that the QrCode is Type WiFi
	QRWiFiType = 0,
	// Constant indicating that the QrCode is Type Event
	QREventType = 1,
    // Constant indicating that the QrCode is Type Contact
    QRContactType = 2,
    // Constant indicating that the QrCode is Type URL
    QRURLType = 3,
    // Constant indicating that the QrCode is Type Location
    QRLocationType = 4,
    // Constant indicating that the QrCode is Type Other
    QROtherType = 5
    
} QRCodeType;

@interface QRCodesManager : NSObject {
    // Grouped QR Codes
    NSMutableDictionary *_groupedQRCodes;
    
    // All QR Codes
    NSMutableArray *_allQrCodes;
}

// Singleton Instance. Notice this is a Class (static) ( it has + in front) method
+ (QRCodesManager *)sharedInstance;

// Returns an NSDictionary of QrCodes grouped by category
- (NSDictionary *)groupedQrCodes;

// Sorted Keys
- (NSArray *)sortedKeys;

// Parses the content from a scanned QR-code and returns a specialized QR-code
- (QRCode *)qrCodeFromString:(NSString *)qrCodeString withName:(NSString *)name;

// Delete QrCode
- (void)deleteQrCode:(QRCode *)qrCode;

// Returns IndexPath Of a QRCode
- (NSIndexPath *)indexPathOfQrCode:(QRCode *)qrCode;

@end
